/**
 * 定义静态路由表
 */
import Navbar from '@/components/navbar'
import Tabbar from '@/components/tabbar'

import Home from '@/views/home'
import Cart from '@/views/cart'
import Category from '@/views/category'
import Detail from '@/views/detail'
import Login from '@/views/mine/login'
import Mine from '@/views/mine'
import NotFound from '@/views/notfound'
import 

const routes = [
  {
    path: '/',
    redirect: '/home' // 重定向到主页
  },
  // 购物车页面有只有navbar

  {
    path: '/home',
    components: {
      default: Home,
      footer: Tabbar
    }
  },
  {
    path: '/category',
    components: {
      default: Category,
      footer: Tabbar
    }
  },
  {
    path: '/cart',
    components: {
      header: Navbar,
      default: Cart
    }
  },
  {
    path: '/mine',
    components: {
      default: Mine,
      footer: Tabbar
    }
  },
  {
    path: '/login',
    component: Login
  },
  {
    path: '/Detail',
    component: Detail
  },
  {
    path: '*',
    component: NotFound
  },
]
export default routes
